package com.game.sdk.shareprefreneces;

import android.text.TextUtils;

import android.content.Context;
import android.content.SharedPreferences;

public class PreferencesUtils {
	public static final String PRE_DIR = "game_pay_sdk";

	public static final String INIT_STATUS = "INIT_STATUS";
	public static final String INIT_PAY_STATUS = "INIT_PAY_STATUS";
	public static final String INIT_NOTICE_STATUS = "INIT_NOTICE_STATUS";
	public static final String INIT_CITYID_STATUS = "INIT_CITYID_TATUS";

	public static void saveInitedStatus(boolean inited, Context atx) {
		SharedPreferences sp = atx.getSharedPreferences(PRE_DIR,
				Context.MODE_PRIVATE);
		sp.edit().putBoolean(INIT_STATUS, inited).commit();
	}

	public static boolean getInitStatus(Context atx) {
		SharedPreferences sp = atx.getSharedPreferences(PRE_DIR,
				Context.MODE_PRIVATE);

		return sp.getBoolean(INIT_STATUS, false);
	}
	public static void saveInitedPayStatus(boolean inited, Context atx) {
		SharedPreferences sp = atx.getSharedPreferences(PRE_DIR,
				Context.MODE_PRIVATE);
		sp.edit().putBoolean(INIT_STATUS, inited).commit();
	}
	
	public static boolean getInitPayStatus(Context atx) {
		SharedPreferences sp = atx.getSharedPreferences(PRE_DIR,
				Context.MODE_PRIVATE);
		
		return sp.getBoolean(INIT_STATUS, false);
	}
	public static void saveInitedNoticeStatus(boolean inited, Context atx) {
		SharedPreferences sp = atx.getSharedPreferences(PRE_DIR,
				Context.MODE_PRIVATE);
		sp.edit().putBoolean(INIT_STATUS, inited).commit();
	}
	
	public static boolean getInitNoticeStatus(Context atx) {
		SharedPreferences sp = atx.getSharedPreferences(PRE_DIR,
				Context.MODE_PRIVATE);
		
		return sp.getBoolean(INIT_STATUS, false);
	}
	public static void saveInitedCityidStatus(boolean inited, Context atx) {
		SharedPreferences sp = atx.getSharedPreferences(PRE_DIR,
				Context.MODE_PRIVATE);
		sp.edit().putBoolean(INIT_STATUS, inited).commit();
	}
	
	public static boolean getInitCityidStatus(Context atx) {
		SharedPreferences sp = atx.getSharedPreferences(PRE_DIR,
				Context.MODE_PRIVATE);
		
		return sp.getBoolean(INIT_STATUS, false);
	}
}
